package com.hubiao.basics.thread;

/**
 * Description
 *
 * @author hubiao
 * @since 2021-01-28 23:00
 */
public class MyThread2 implements Runnable {
    private String name;

    public static void main(String[] args) {
        MyThread2 myThread = new MyThread2();
        myThread.setName( "world" );
        Thread thread = new Thread( myThread );
        thread.start();
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println( "hello " + name );
    }
}
